/*
	Name:
	Copyright:Take it at will
	Author:Rodney
	Date: 
	Description:
*/
#include<stdio.h>
#include<stdlib.h>

int main()
{
	int i;
	char ch;
	FILE *fp;
	if((fp = fopen("T1.cpp","r")) == NULL)
	{
		puts("fail to open the file");
		exit(0);
	}
	
	for(i=1;;i++)
	{
		printf("%2d: ",i);
		while((ch = fgetc(fp)) != '\n')
			putchar(ch);
		putchar('\n');
		if(fgetc(fp) == EOF)
			break;
		else
			fseek(fp,-1,SEEK_CUR);
	}
	
	fclose(fp);
}

